<?php
namespace app\front\controller;

use app\front\logic\ApiLogic;
use app\front\logic\EmailLogic;

class Other extends Base{
	//获取ltc和usdt相对当前货币的汇率
	function getLtcUsdtRate(){
		$data = [];
		$data['ltc_rate'] = $this->ltc_rate;
		$data['usdt_rate'] = $this->usdt_rate;
		return ApiLogic::return($this->lang,0,'',$data);
	}

	//查看购买的邮箱列表
	function showEmailList(){
		$mdfkey = trim(input('mdfkey', ''));
		if(!$mdfkey){
			return ApiLogic::return($this->lang,0);
		}

		$lists = EmailLogic::init()->showEmailList($mdfkey);
		return ApiLogic::return($this->lang,0,'',$lists);
	}

	//获取购买的邮箱文件，文件流的方式返回
    function getFileStream(){
        $mdfkey = trim(input('mdfkey', ''));
		if(!$mdfkey){
			return ApiLogic::return($this->lang,0);
		}
        $data = EmailLogic::init()->getFileStream($mdfkey);
        // return ApiLogic::return($this->lang, 0, '', $data);
    }
}